<template>
<div id="">
  <van-tabbar @change="change" v-model="active">
    <van-tabbar-item name="/home" icon="home-o">首页</van-tabbar-item>
    <van-tabbar-item name="/ground" icon="search">实践基地</van-tabbar-item>
    <van-tabbar-item name="/activities" icon="friends-o">志愿活动</van-tabbar-item>
  </van-tabbar>
</div>
</template>
<script>
export default {
  name: "",
  props: ['activeNavIndex'],
  data: () => ({
    active: "home"
  }),
  methods: {
    change(val) {
      console.log(val)
      const router = this.$router
      // this.$store.commit("changeTabActive",active)
      router.push({
        path: val
      })
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
